create table TB_APPLICATION
(
       APP_CODE NVARCHAR2(200),
       APP_NAME NVARCHAR2(200),
       APP_TYPE NVARCHAR2(20),
	   IsActive nvarchar2(2) default('y'),
       COMMENTS NVARCHAR2(1000),
	   Sync_Date Date,
	   Update_Date Date,
       CONSTRAINT PK_TB_APPLICATION PRIMARY KEY
       (
       APP_CODE
       )
)
;
create table TB_APPLICATION_TEMP
(
       APP_CODE NVARCHAR2(200),
       APP_NAME NVARCHAR2(200),
       APP_TYPE NVARCHAR2(20),
	   IsActive nvarchar2(2) default('y'),
       COMMENTS NVARCHAR2(1000),
       CONSTRAINT PK_TB_APPLICATION_TEMP PRIMARY KEY
       (
       APP_CODE
       )
)
;
CREATE GLOBAL TEMPORARY TABLE T_SYNC_APPLICATION
(
	APP_CODE NVARCHAR2(200)
)
ON COMMIT DELETE ROWS ;
